package com.ruoyi.function.domain.bo;

import com.google.gson.annotations.SerializedName;
import lombok.Data;

@Data
public class WechatPayCallbackBo {
    @SerializedName("resource")
    private Resource resource;

    @SerializedName("resource_type")
    private String resourceType;

    @SerializedName("summary")
    private String summary;

    @Data
    public static class Resource {
        @SerializedName("amount")
        private Amount amount;

        @SerializedName("appid")
        private String appId;

        @SerializedName("attach")
        private String attach;

        @SerializedName("bank_type")
        private String bankType;

        @SerializedName("mchid")
        private String mchId;

        @SerializedName("out_trade_no")
        private String outTradeNo;

        @SerializedName("payer")
        private Payer payer;

        @SerializedName("promotion_detail")
        private Object promotionDetail;

        @SerializedName("success_time")
        private String successTime;

        @SerializedName("trade_state")
        private String tradeState;

        @SerializedName("trade_state_desc")
        private String tradeStateDesc;

        @SerializedName("trade_type")
        private String tradeType;

        @SerializedName("transaction_id")
        private String transactionId;
    }

    @Data
    public static class Amount {
        @SerializedName("currency")
        private String currency;

        @SerializedName("payer_currency")
        private String payerCurrency;

        @SerializedName("payer_total")
        private Integer payerTotal;

        @SerializedName("total")
        private Integer total;
    }

    @Data
    public static class Payer {
        @SerializedName("openid")
        private String openid;
    }
}

